﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyTest
{
    /// <summary>
    /// 教员:薛海
    /// 微信:xuehai03
    /// QQ:289477003 
    /// 图片显示
    /// 2019-2-20
    /// </summary>
    public partial class FrmPhoto : Form
    {
        public FrmPhoto()
        {
            InitializeComponent();
        }

       //显示本地图片
        private void btnRead_Click(object sender, EventArgs e)
        {
            //打开计算机 找到相片
            this.openFileDialog1.ShowDialog();
            //显示图片到文本框
            this.txtPath.Text = this.openFileDialog1.FileName;
            //显示相片到相框中
            this.pictureBox1.Image =Image.FromFile( this.openFileDialog1.FileName);
        }
    }
}
